<template>
  <div id="client">
    <p style="position: relative; right: 180px; scale: 0.8; width: 1700px">
      <span class="demonstration" style="margin-left: 20px">单据日期：</span>
      <el-date-picker
        v-model="value2"
        type="daterange"
        align="right"
        unlink-panels
        range-separator="至"
        start-placeholder="开始日期"
        end-placeholder="结束日期"
        :picker-options="pickerOptions"
      >
      </el-date-picker>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 采购人员：<el-input
        style="width: 180px; margin-left: 10px; margin-right: 20px"
        placeholder="请输入采购人员"
        v-model="input"
        clearable
      ></el-input>
      <el-button
        style="margin-left: -20px; margin-right: 10px"
        @click="dialogFormVisiblecg = true"
        >...</el-button
      >
      &nbsp;&nbsp;&nbsp; 商品：<el-input
        style="width: 180px; margin-left: 10px; margin-right: 20px"
        placeholder="请输入商品"
        v-model="input"
        clearable
      ></el-input>
      <el-button
        style="margin-left: -20px; margin-right: 10px"
        @click="dialogFormVisible = true"
        >...</el-button
      >
      &nbsp;&nbsp;&nbsp; 商品类别：<el-select
        v-model="value"
        placeholder="商品类别"
        style="width: 100px"
      >
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        >
        </el-option>
      </el-select>
      &nbsp;&nbsp;&nbsp;
      <el-button type="primary">查询</el-button>
    </p>
    <p style="text-align: center; scale: 0.8; margin-top: 20px; width: 100%">
      <span style="font-weight: bolder; font-size: 22px"
        >采购汇总表（按业务员）</span
      >
      <span style="display: inline-block; float: right">
        <el-button>导出</el-button>
        <el-button>打印</el-button>
      </span>
      <el-divider style="width: 1500px"></el-divider>
    </p>
    <el-table :data="tableData" height="300" border style="width: 100%" show-summary>
      <el-table-column prop="id" label="采购人员编号" width="150px">
      </el-table-column>
      <el-table-column prop="name" label="采购人员" width="150px">
      </el-table-column>
      <el-table-column prop="num" label="基本数量" width="150px">
      </el-table-column>
      <el-table-column prop="taxmoney" label="税额" width="150px">
      </el-table-column>
      <el-table-column prop="sellmoney" label="采购金额" width="150px">
      </el-table-column>
      <el-table-column prop="lastmoney" label="价税合计" width="150px">
      </el-table-column>
    </el-table>
    
    <el-dialog top="20px" title="添加业务员" :visible.sync="dialogFormVisible">
      <el-input
        v-model="input"
        placeholder="请输入编号或名称"
        style="width: 200px; margin-left: 20px"
      ></el-input>
      <el-checkbox v-model="checked" style="margin-left: 20px"
        >显示禁用职员</el-checkbox
      >
      <el-button type="success" style="margin-left: 20px">查询</el-button>
      <el-table :data="gridData">
        <el-table-column type="selection" width="55"> </el-table-column>
        <el-table-column
          width="100"
          property="name"
          label="类别"
        ></el-table-column>
        <el-table-column
          width="100"
          property="address"
          label="编号"
        ></el-table-column>
        <el-table-column
          width="300"
          property="address"
          label="名称"
        ></el-table-column>
        <el-table-column
          width="100"
          property="address"
          label="联系人"
        ></el-table-column>
        <el-table-column
          width="100"
          property="address"
          label="手机"
        ></el-table-column>
        <el-table-column
          width="100"
          property="address"
          label="备注"
        ></el-table-column>
      </el-table>
      <div class="block">
        <span class="demonstration"></span>
        <el-pagination layout="prev, pager, next" :total="1000">
        </el-pagination>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogFormVisible = false"
          >确 定</el-button
        >
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data() {
    return {
      dialogFormVisiblecg: false,

      
      dialogFormVisible: false,
      gridData: [
        {
          date: "2016-05-02",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-03",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
      ],
      tableData: [
        {
          nogonum: 10,
          nogomoney: 50,
          deliverydate: "2024-12-30",
          godate: "2024-12-31",
          doman: "321",
          text: "备注",
          num: 100,
          price: 3,
          sellmoney: 500,
          id: "123",
          orderDate: "2016-05-03",
          name: "冰红茶",
          type: "500ml",
          brand: "康师傅",
          dw: "瓶",
          orderDate: "2016-05-03",
          sellid: "456",
          type: "500ml",
          sellman: "789",
          kehu: "000",
          ck: "默认仓库",
        },
        {
          nogonum: 10,
          nogomoney: 50,
          deliverydate: "2024-12-30",
          godate: "2024-12-31",
          doman: "321",
          text: "备注",
          num: 100,
          price: 3,
          sellmoney: 500,
          id: "123",
          orderDate: "2016-05-03",
          name: "冰红茶",
          type: "500ml",
          brand: "康师傅",
          dw: "瓶",
          orderDate: "2016-05-03",
          sellid: "456",
          type: "500ml",
          sellman: "789",
          kehu: "000",
          ck: "默认仓库",
        },
        {
          nogonum: 10,
          nogomoney: 50,
          deliverydate: "2024-12-30",
          godate: "2024-12-31",
          doman: "321",
          text: "备注",
          num: 100,
          price: 3,
          sellmoney: 500,
          id: "123",
          orderDate: "2016-05-03",
          name: "冰红茶",
          type: "500ml",
          brand: "康师傅",
          dw: "瓶",
          orderDate: "2016-05-03",
          sellid: "456",
          type: "500ml",
          sellman: "789",
          kehu: "000",
          ck: "默认仓库",
        },
        {
          nogonum: 10,
          nogomoney: 50,
          deliverydate: "2024-12-30",
          godate: "2024-12-31",
          doman: "321",
          text: "备注",
          num: 100,
          price: 3,
          sellmoney: 500,
          id: "123",
          orderDate: "2016-05-03",
          name: "冰红茶",
          type: "500ml",
          brand: "康师傅",
          dw: "瓶",
          orderDate: "2016-05-03",
          sellid: "456",
          type: "500ml",
          sellman: "789",
          kehu: "000",
          ck: "默认仓库",
        },
        {
          nogonum: 10,
          nogomoney: 50,
          deliverydate: "2024-12-30",
          godate: "2024-12-31",
          doman: "321",
          text: "备注",
          num: 100,
          price: 3,
          sellmoney: 500,
          id: "123",
          orderDate: "2016-05-03",
          name: "冰红茶",
          type: "500ml",
          brand: "康师傅",
          dw: "瓶",
          orderDate: "2016-05-03",
          sellid: "456",
          type: "500ml",
          sellman: "789",
          kehu: "000",
          ck: "默认仓库",
        },
        {
          nogonum: 10,
          nogomoney: 50,
          deliverydate: "2024-12-30",
          godate: "2024-12-31",
          doman: "321",
          text: "备注",
          num: 100,
          price: 3,
          sellmoney: 500,
          id: "123",
          orderDate: "2016-05-03",
          name: "冰红茶",
          type: "500ml",
          brand: "康师傅",
          dw: "瓶",
          orderDate: "2016-05-03",
          sellid: "456",
          type: "500ml",
          sellman: "789",
          kehu: "000",
          ck: "默认仓库",
        },
        {
          nogonum: 10,
          nogomoney: 50,
          deliverydate: "2024-12-30",
          godate: "2024-12-31",
          doman: "321",
          text: "备注",
          num: 100,
          price: 3,
          sellmoney: 500,
          id: "123",
          orderDate: "2016-05-03",
          name: "冰红茶",
          type: "500ml",
          brand: "康师傅",
          dw: "瓶",
          orderDate: "2016-05-03",
          sellid: "456",
          type: "500ml",
          sellman: "789",
          kehu: "000",
          ck: "默认仓库",
        },
        {
          nogonum: 10,
          nogomoney: 50,
          deliverydate: "2024-12-30",
          godate: "2024-12-31",
          doman: "321",
          text: "备注",
          num: 100,
          price: 3,
          sellmoney: 500,
          id: "123",
          orderDate: "2016-05-03",
          name: "冰红茶",
          type: "500ml",
          brand: "康师傅",
          dw: "瓶",
          orderDate: "2016-05-03",
          sellid: "456",
          type: "500ml",
          sellman: "789",
          kehu: "000",
          ck: "默认仓库",
        },
      ],
      dialogFormVisible: false,
      value2: "",
    };
  },
  methods: {
    goto(to) {
      if (this.$route.path !== "/" + to) {
        this.$router.push(to);
      }
    },
  },
};
</script>

<style scoped>
.el-button el-button--default el-popover__reference {
  margin-right: 20px;
}

tr {
  border: 1px solid black;
}
</style>